{% extends "bootstrap/base.html" %}

{% block title %}Hacker Blog{% endblock %}

{% block navbar %}
<div class="navbar navbar-inverse" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="{{url_for('main.index') }}">Hacker Blog</a>
        </div>
	 <div>
        <ul class="nav navbar-nav">
            <li class="active"><a href="{{url_for('main.index') }}">Home</a></li>
           <li class="dropdown">
                <a href="{{url_for('main.index') }}" class="dropdown-toggle" data-toggle="dropdown">
                    Language
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="{{url_for('main.index') }}">python</a></li>
                    <li><a href="{{url_for('main.index') }}">c++</a></li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="{{url_for('main.index') }}" class="dropdown-toggle" data-toggle="dropdown">
                    Web
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="{{url_for('main.index') }}">Flask</a></li>
                    <li class="divider"></li>
                    <li><a href="{{url_for('main.index') }}">Django</a></li>
                </ul>
            </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
                {% if current_user.is_authenticated %}
                <li class="dropdown">
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown">Account <b class="caret"></b></a>
                     <ul class="dropdown-menu">
                       <li><a href="{{ url_for('auth.change_password') }}">Change Password</a></li>
                       <li><a href="{{ url_for('auth.change_email_request') }}">Change Email</a></li>
                       <li><a href="{{ url_for('auth.logout') }}">Log Out</a></li>
                    </ul>
               </li>
                {% else %}
                <li><a href="{{ url_for('auth.login') }}">Log In</a></li>
                {% endif %}
            </ul>
     </div>
        <div>
           <form class="navbar-form navbar-right" role="search">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Search">
            </div>
            <button type="submit" class="btn btn-default">提交</button>
          </form>
        </div>
    </div>
</div>
{% endblock %}

{% block content %}
<div class="container">
    {% for message in get_flashed_messages() %}
    <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message }}
    </div>
    {% endfor %}
    {% block page_content %}{% endblock %}
</div>
{% endblock %}
